<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
		
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		
		<title><?php echo C("SITE_INFO.name");?></title>
	
		
		
		<!--                       CSS                       -->
	  
		<!-- Reset Stylesheet -->
		<link rel="stylesheet" href="__PUBLIC__/css/reset.css" type="text/css" media="screen" />
	  
		<!-- Main Stylesheet -->
		<link rel="stylesheet" href="__PUBLIC__/css/cms_admin/style.css" type="text/css" media="screen" />
		
		<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
		<link rel="stylesheet" href="__PUBLIC__/css/invalid.css" type="text/css" media="screen" />	
		

	  
		<!-- jQuery -->
		<script type="text/javascript" src="__PUBLIC__/scripts/jquery-1.7.2.min.js"></script>
		
		<!-- jQuery Configuration -->
		<script type="text/javascript" src="__PUBLIC__/scripts/simpla.jquery.configuration.js"></script>
        		
		<!-- jQuery WYSIWYG Plugin -->
		<script type="text/javascript" src="__PUBLIC__/scripts/jquery.wysiwyg.js"></script>
  
		 <!-- jQuery UI  -->         
		<link rel="stylesheet" href="__PUBLIC__/scripts/ui/redmond/jquery-ui-1.8.6.css">        
        <script type="text/javascript" src="__PUBLIC__/scripts/ui/jquery-ui-1.8.6.min.js"></script>
		
        <script src="__PUBLIC__/scripts/utils.js" type="text/javascript"></script>
        
    <!-- ckeditor  -->        
     <link rel="stylesheet" href="__PUBLIC__/kindeditor/themes/default/default.css" />
     <script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor.js"></script>
        
	  <script>	
          KindEditor.ready(function(K) {
              var editor = K.create('textarea.HTMLeditor', {
                          allowFileManager : true,
                          width : 800,
                          height : 400,
						  afterBlur: function(){this.sync();}
				}); 
          });	
      </script>
       
      <script type="text/javascript" src="__PUBLIC__/scripts/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
      <script type="text/javascript" src="__PUBLIC__/scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>      
      <link rel="stylesheet" type="text/css" href="__PUBLIC__/scripts/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
      <script>
	  $(function(){
		 $("a.fancyBox").fancybox(); 
	  })	 
	  </script>
      
        
        

	</head>
  
	<body>
    
    <div id="body-wrapper" > <!-- Wrapper for the radial gradient background -->		

        <!--left start-->
		
        <div id="sidebar"   >
 <div id="sidebar-wrapper" style="position:relative; height:100%"> 
 <!-- Sidebar with logo and menu -->
		  
    <!-- Sidebar Profile links -->
    <div id="profile-links" style="margin-top:110px; font-size:12px;">
        Hello, <a href="#" onclick="return false;" title="Edit your profile"><?php echo ($loginName); ?></a>			
        <br />
        <br />
        <a href="__APP__" target="_blank" title="View the Site">View the Site</a> | 
        <a href="<?php echo U('Login/logoff');?>" title="Sign Out">Sign Out</a>
     </div>     
        
			
<ul id="main-nav"> 		
				
<?php echo W('Nav');?>
<!--	<li id="li_Menu_1">    
	    <a href="#" class="nav-top-item  <?php if((MODULE_NAME != "Users") and (MODULE_NAME != "Configuration")): ?>current<?php endif; ?>">Menu</a>
    	<ul style='display:none;' >
        	
            <?php if(is_array($nav_name)): $i = 0; $__LIST__ = $nav_name;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i; if(($v != 'Users') and ($v != 'Configuration')): ?><li>           
                        <a href="<?php echo U($v.'/index');?>" class="<?php if(MODULE_NAME == $v): ?>current<?php endif; ?>"><?php echo ($v); ?></a>
                    </li><?php endif; endforeach; endif; else: echo "" ;endif; ?>	        
		</ul>
	</li>	
  <?php if((in_array('Users',$nav_name)) or in_array('Configuration',$nav_name) or (session('adminId') == 1) ): ?><li id="li_Menu_2">    
            <a href="#" class="nav-top-item <?php if((MODULE_NAME == "Users") or (MODULE_NAME == "Configuration")): ?>current<?php endif; ?>">Configuration</a>
            <ul style='display:none;' >
                
               <?php if(is_array($nav_name)): $i = 0; $__LIST__ = $nav_name;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i; if(($v == 'Users') OR ($v == 'Configuration')): ?><li>           
                            <a href="<?php echo U($v.'/index');?>" class="<?php if(MODULE_NAME == $v): ?>current<?php endif; ?>"><?php echo ($v); ?></a>
                        </li><?php endif; endforeach; endif; else: echo "" ;endif; ?>	        
            </ul>
        </li><?php endif; ?> -->
    
    
    	
</ul> 				
  </div>
</div> 
        <!--left end-->
        
        
        <!-- End #sidebar -->			
		<div id="main-content"> <!-- Main Content Section with everything -->        
        		<div  id="header_logo"><?php echo C("SITE_INFO.name");?></div>	 		
			
			<!-- Page Head -->
			<div style="float:left; width:380px;">
			  <h2>Configuration</h2></div>
			<div class="clear"></div> <!-- End .clear -->     
                  <?php echo ($msg); ?>
                <!-- Insert -->
                <div class="content-box">				
                    <div class="content-box-header">                                          	
                      <div class="clear"></div>					
                    </div>
                    <div class="content-box-content">			
                        <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->	
                          <form action="<?php echo U('checkSystemConfig');?>" name="insertForm" method="post" enctype="multipart/form-data" >
                             <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
                            <tr class="alt-row">
                                <th width="120">Site Name:</th>
                                <td><input name="name" type="text" class="text-input small-input" size="40" value="<?php echo ($site["SITE_INFO"]["name"]); ?>" /></td>
                            </tr>
                            <tr>
                                <th>E-mail:</th>
                                <td><input class="text-input small-input" name="service" type="text" size="40" value="<?php echo ($site["SITE_INFO"]["service"]); ?>" /></td>
                            </tr>
                            <tr  class="alt-row">
                                <th>Tel:</th>
                                <td><input class="text-input small-input" name="tel" type="text" size="40" value="<?php echo ($site["SITE_INFO"]["tel"]); ?>" /></td>
                            </tr>
                            <tr>
                                <th>Fax:</th>
                                <td><input class="text-input small-input" name="fax" type="text" size="40" value="<?php echo ($site["SITE_INFO"]["fax"]); ?>" /></td>
                            </tr>
                            <tr  class="alt-row">
                                <th>Address:</th>
                                <td><input class="text-input small-input" name="address" type="text" size="40" value="<?php echo ($site["SITE_INFO"]["address"]); ?>" /></td>
                            </tr>
                            <tr>
                                <th>Postcode:</th>
                                <td><input class="text-input small-input" name="postcode" type="text" size="40" value="<?php echo ($site["SITE_INFO"]["postcode"]); ?>" /></td>
                            </tr>
                            <tr  class="alt-row">
                                <th>Keyword：</th>
                                <td><input class="text-input small-input" name="keyword" type="text" size="40" value="<?php echo ($site["SITE_INFO"]["keyword"]); ?>" /></td>
                            </tr>
                            <tr>
                                <th valign="top" style="vertical-align: top;">Description：</th>
                                <td><textarea name="description" cols="100" rows="3"><?php echo ($site["SITE_INFO"]["description"]); ?></textarea></td>
                            </tr>
                            <tr  class="alt-row">
                                <th>默认城市：</th>
                                <td> 
							                                省份：
								    <select id="cname" name="provcode" autocomplete="off"> 
								        <option value="-1">请选择省份</option>
								        <?php if(is_array($allProvince)): foreach($allProvince as $key=>$vo): ?><option value="<?php echo ($vo["code"]); ?>" <?php if($site['SITE_INFO']['provcode'] == $vo['code']): ?>selected="selected"<?php endif; ?>><?php echo ($vo["name"]); ?></option><?php endforeach; endif; ?>
								    </select> 
								    城市：
								    <select id="qname" name="citycode" autocomplete="off"> 
								        <option value="-1">请选择城市</option>
								        <?php if(is_array($allCity)): foreach($allCity as $key=>$vo): ?><option value="<?php echo ($vo["code"]); ?>" <?php if($site['SITE_INFO']['citycode'] == $vo['code']): ?>selected="selected"<?php endif; ?> ><?php echo ($vo["name"]); ?></option><?php endforeach; endif; ?>
								    </select> 
								  
								    <script>
								    $(document).ready(function(){
								        // 初始时的控件的值
								        var cityId = $("#cname").val();
								        var areaId = $("#qname").val();
								       
								        //城市
								        var allProvince = eval('<?php echo ($e_allProvince); ?>');
								        var allCity = eval('<?php echo ($e_allCity); ?>');
								   
								        var html = "";
								
								        function ref_component_base(curr_change_id, title, each_var, b_id, curr_id, html_val, op_attr_id, op_attr_name){
								            if (curr_change_id != '-1') {
								                // 区域
								                html = "<option value='-1'>" + title + "</option>";
								                $.each(each_var, function(a,b){
								                    if (b[b_id] == curr_change_id) {
								                        if ( curr_id != '-1' && curr_id == b[op_attr_id] ) {
								                            html += "<option value='" + b[op_attr_id] + "' selected='selected'>" + b[op_attr_name] + "</option>"
								                        } else {
								                            html += "<option value='" + b[op_attr_id] + "'>" + b[op_attr_name] + "</option>"
								                        }
								                    };
								                });
								                $("#" + html_val).html(html);
								            } else {
								                html = "<option value='-1'>" + title + "</option>";
								                $("#" + html_val).html(html);
								            }
								        }
								
								        function ref_component(){
								            ref_component_base(cityId, "请选择城市", allCity, 'provincecode', areaId, "qname", 'code', 'name');
								           // ref_component_base(areaId, "请选择分区", allArea, 'citycode', streetId, "jname", 'code', 'name');
								        }
								
								        ref_component();
								        
								        // 城市有变化
								        $("#cname").bind("change",function(){ 
								            cityId = $("#cname").val();
								            areaId = '-1';
								            streetId = '-1';
								            shequId = '-1';
								            ref_component();
								        });
								
								      
								    });
								
	    						</script>
	    						</td>
                            </tr>
                           
                            <tr>
                                <th width="120">线上支付开关:</th>
                                <td><input name="onlinepay" type="checkbox" <?php if($site['SITE_INFO']['onlinepay'] == 1): ?>checked="checked"<?php endif; ?>  value="1" /></td>
                            </tr>
                            <tr class="alt-row">
                                <td colspan="2" valign="top" style="vertical-align: top;">微信支付信息：</td>
                            </tr>
                            <tr>
                                <th width="120">AppId:</th>
                                <td><input name="appid" type="text" class="text-input small-input" size="40" value="<?php echo ($site["SITE_INFO"]["appid"]); ?>" /></td>
                            </tr>
                            <tr class="alt-row">
                                <th>AppSecret:</th>
                                <td><input class="text-input small-input" name="appsecret" type="text" size="40" value="<?php echo ($site["SITE_INFO"]["appsecret"]); ?>" /></td>
                            </tr>
                            <tr>
                                <th width="120">商户号:</th>
                                <td><input name="shopnum" type="text" class="text-input small-input" size="40" value="<?php echo ($site["SITE_INFO"]["shopnum"]); ?>" /></td>
                            </tr>
                            <tr class="alt-row">
                                <th>支付密钥:</th>
                                <td><input class="text-input small-input" name="paypwd" type="text" size="40" value="<?php echo ($site["SITE_INFO"]["paypwd"]); ?>" /></td>
                            </tr>
                            <tr>
                                <th valign="top" style="vertical-align: top;">Other Description：</th>
                                <td><textarea name="other_description" cols="100" rows="3"><?php echo ($site["SITE_INFO"]["other_description"]); ?></textarea></td>
                            </tr>
                        </table>
                              
                            <br>
                             <input class="button" style="text-transform:capitalize" type="button" name="BtnSave" onClick="document.insertForm.submit()"  value="Save" />&nbsp;&nbsp;
                            </form>     
                            
                            <!--<input class="button" type="button" name="back" onClick="window.location.href='<?php echo U('index');?>'"  value="返回" /-->                  	
                        </div> <!-- End #tab1 --> 
                    </div>
                </div> 
                <!--End Insert -->
			
			
			<div class="clear"></div>
			
			
			<!-- Start Notifications -->
			
			

			
			<!-- End Notifications -->
			
            <div id="footer">
				<small> <!-- Remove this notice or replace it with whatever you want -->
						&#169; Copyright 2013
				</small>
			</div>
			
			
			
			<!-- End #footer -->
			
		</div> <!-- End #main-content -->
		
	</div>
	
	
	
	</body>
<!-- Download From www.exet.tk-->
</html>